Aurimas Černius [Sun, 8 May 2016 15:30:49 +0000 (18:30 +0300)]
Updated Lithuanian translation
Rafael Fontenelle [Sun, 8 May 2016 14:25:31 +0000 (14:25 +0000)]
Updated Brazilian Portuguese translation
(cherry picked from commit
207b793316a90faff00d5ea6fbe483d5a184d066)
Timm Bäder [Sun, 8 May 2016 13:52:56 +0000 (15:52 +0200)]
tooltip: Include gtkwidgetprivate.h
That's where gtk_widget_query_tooltip is defined.
Timm Bäder [Sun, 8 May 2016 13:34:28 +0000 (15:34 +0200)]
gdk: Fix parameter name mismatch
Timm Bäder [Mon, 2 May 2016 06:59:40 +0000 (08:59 +0200)]
infobar: Fix typo
Style class names are prefixed with a '.'
Matthias Clasen [Sat, 7 May 2016 20:22:13 +0000 (16:22 -0400)]
gtk-demo: Fix revealer demo
This only used by luck before. We are changing a property from the
::notify handler for that property. Now that GtkRevealer is notifying
the property when it stops animations on unmap, we end up in a life
lock situation where we never make it out of the notify queue.
Fix this by not restarting the animation if the widget is unmapped.
Ray Strode [Sat, 7 May 2016 02:29:31 +0000 (22:29 -0400)]
widget: add missing detail to ::query-tooltip emission
This was an oversight in commit
dfb368e29bb58b4313b578f0ce75cfc8ead9a1.
Matthias Clasen [Sat, 7 May 2016 00:51:25 +0000 (20:51 -0400)]
tooltip: Add a missing *
This was an oversight in the previous commit.
Matthias Clasen [Sat, 7 May 2016 00:50:38 +0000 (20:50 -0400)]
gtk3-demo: Add a close button to the markup window
Matthias Clasen [Sat, 7 May 2016 00:47:49 +0000 (20:47 -0400)]
gtk-demo: Don't duplicate text in markup example
I forgot to clear the buffer before inserting the new markup. Oops.
Matthieu Gautier [Wed, 4 May 2016 10:42:40 +0000 (12:42 +0200)]
revealer: emit notify::child-revealed when animation stops
Depending of float rounding during target calculation, the size of the
GtkRevealer can be set to zero will the animation is not finished.
If the GtkRevealer is in a GtkPaned, it will be hidden and so the animation
will be stopped before it is finished.
In this case, force the emission of the child-revealed signal to let
client code know the animation is finished.
https://bugzilla.gnome.org/show_bug.cgi?id=765973
Matthias Clasen [Fri, 6 May 2016 17:45:46 +0000 (13:45 -0400)]
Simplify our templates
This is applying the new property name simplification.
Matthias Clasen [Fri, 6 May 2016 17:45:09 +0000 (13:45 -0400)]
Clean up builder parser data after parsing
No need to have these linger around in qdata.
Matthias Clasen [Fri, 6 May 2016 17:42:30 +0000 (13:42 -0400)]
builder tool: Canonicalize property names
When simplifying, convert property names to canonical form,
so we don't waste time while looking them up later.
Cédric Valmary [Fri, 6 May 2016 18:31:42 +0000 (18:31 +0000)]
Updated Occitan translation
Lapo Calamandrei [Fri, 6 May 2016 17:34:12 +0000 (19:34 +0200)]
Adwaita: darken treeview exapanders
Lapo Calamandrei [Fri, 6 May 2016 17:01:19 +0000 (19:01 +0200)]
Adwaita: cosmetic change
Lapo Calamandrei [Fri, 6 May 2016 16:50:37 +0000 (18:50 +0200)]
Adwaita: relocate a selector
relocate treview acceleditor > label in the treeview section and
add a comment for a testcase.
Matthias Clasen [Fri, 6 May 2016 14:12:14 +0000 (10:12 -0400)]
Avoid emitting ::style-set by name
GtkStyle is deprecated, but we still emit ::style-set quite
a bit, so lets at least not be slow while doing it.
Matthias Clasen [Fri, 6 May 2016 13:54:24 +0000 (09:54 -0400)]
Don't emit ::query-tooltip by name
This signal is emitted quite a bit, and we can easily avoid it.
Matthias Clasen [Fri, 6 May 2016 13:38:18 +0000 (09:38 -0400)]
Stop storing has-tooltip in qdata
This is queried quite a bit, and we have room for an extra
bit in GtkWidgetPrivate.
Matthias Clasen [Fri, 6 May 2016 11:54:22 +0000 (07:54 -0400)]
Don't use qdata for getting the default css style
There's no point in using qdata for looking this up, since
we only ever set it on the default screen anyway.
Lapo Calamandrei [Fri, 6 May 2016 13:36:26 +0000 (15:36 +0200)]
Adwaita: tidy treeview style properties...
...removing a double definition in the process.
Matthias Clasen [Fri, 6 May 2016 11:08:56 +0000 (07:08 -0400)]
settings: Fix font names *again*
This is the last time, I hope.
Matthias Clasen [Fri, 6 May 2016 10:42:43 +0000 (06:42 -0400)]
widget: Store accessible in GtkWidgetPrivate
Every widget may have one of these, and they are accessed somewhat
frequently.
Matthias Clasen [Fri, 6 May 2016 04:46:17 +0000 (00:46 -0400)]
Ensure we initialize a quark first
The style function here can also be called before the corresponding
class_init had a chance to create the quark. Fix this.
Matthias Clasen [Fri, 6 May 2016 04:45:05 +0000 (00:45 -0400)]
tooltip: Ensure our quark is not 0
Many of the tooltip functions can be called before a tooltip
object is created, and thus initializing the quark in class_init
is not good enough.
Matthias Clasen [Fri, 6 May 2016 04:21:08 +0000 (00:21 -0400)]
Use a cheaper way to store settings per display
This was another very frequent use of qdata. Since we typically
have only one or two display objects, storing the display-settings
association in a simple array is faster than using object data
or a hash table.
Matthias Clasen [Thu, 5 May 2016 22:51:30 +0000 (18:51 -0400)]
Use a cheaper way to store debug flags
This was the most frequent use of qdata *by far*.
Matthias Clasen [Thu, 5 May 2016 23:21:27 +0000 (19:21 -0400)]
Fix indentation mishap
Matthias Clasen [Thu, 5 May 2016 23:17:31 +0000 (19:17 -0400)]
Fix a typo
Christian Hergert [Fri, 6 May 2016 08:31:41 +0000 (11:31 +0300)]
wayland: use g_signal_handler_disconnect()
Use of g_signal_handlers_disconnect_by_func() needs to do more work than
necessary to find all the matching handlers. Instead, just hold on to the
signal identifier and remove it directly so we hit the fast path.
Not terribly ground breaking in terms of performance gains, but its done
enough to be worthwhile.
https://bugzilla.gnome.org/show_bug.cgi?id=766049
Matthias Clasen [Thu, 5 May 2016 19:37:21 +0000 (15:37 -0400)]
Update color name css style test
Verify rebeccapurple too.
Matthias Clasen [Thu, 5 May 2016 19:17:56 +0000 (15:17 -0400)]
scale: Fix mark positioning at the left/top edge
We were failing to take the widget allocation.x/y into account
when deciding whether we need to push in the mark.
https://bugzilla.gnome.org/show_bug.cgi?id=765922
Matthias Clasen [Thu, 5 May 2016 18:13:03 +0000 (14:13 -0400)]
Generalize the previous commit
Update all xsettings when we get a screen, to prevent similar
problems from occurring in the future.
Matthias Clasen [Thu, 5 May 2016 17:30:55 +0000 (13:30 -0400)]
settings: Avoid a crash
Christian Hergert reported seeing webkit crashes with recent
GTK+. The stacktrace points at the CSS machinery calling into
GtkSettings to get the font name, and then getting surprised
by a property notification that triggers style validation.
To avoid this, query the font name xsetting right away when
we get set a screen.
Carlos Garnacho [Thu, 5 May 2016 17:00:28 +0000 (19:00 +0200)]
x11: Rely on passive keyboard grabs with XI2 for DnD
The active keyboard grab can be spared then. This way the passive
key grabs allow other key combinations (eg. alt-tab) that are not
mandatory to grab here.
Lapo Calamandrei [Thu, 5 May 2016 16:36:03 +0000 (18:36 +0200)]
Adwaita: more flexible headerbar_fill mixin
add an additional background layer as a parameter.
Carlos Garnacho [Wed, 4 May 2016 12:23:17 +0000 (14:23 +0200)]
searchenginetracker: Quote fts match so it's seen as a single phrase
FTS5 has a complex enough syntax that it makes not much sense to wrap
in simple search boxes.
https://bugzilla.gnome.org/show_bug.cgi?id=765981
Timm Bäder [Thu, 5 May 2016 09:21:56 +0000 (11:21 +0200)]
label: Also initialize text
So gtk_label_get_text returns the default value of "". Broke the
GtkModelButton default value test.
Timm Bäder [Thu, 5 May 2016 06:47:40 +0000 (08:47 +0200)]
cssgadget: Remove unused function
Timm Bäder [Wed, 4 May 2016 20:24:52 +0000 (22:24 +0200)]
gtkrender: Remove superfluous cairo_save/restore calls
These were all surrounding functions that either call
cairo_save/cairo_restore themselves or don't need to.
Matthias Clasen [Wed, 4 May 2016 20:05:40 +0000 (16:05 -0400)]
css node: Stop extraneous change notification
The ::name and ::widget-type properties are entirely independent,
no need to notify both when either changes.
Matthias Clasen [Wed, 4 May 2016 19:05:08 +0000 (15:05 -0400)]
box: Only emit ::child-notify when necessary
We can easily check if the values for expand, padding and so forth
actually changed, so lets do it.
Matthias Clasen [Wed, 4 May 2016 17:52:09 +0000 (13:52 -0400)]
Revert "When creating a widget path, use the widget type"
This reverts commit
0d78b67bca8866a05d0d55d3d5c48aa7a90ff89e.
As Benjamin points out: that'll break all widgets that query style
properties in their init function.
Matthias Clasen [Wed, 4 May 2016 17:41:05 +0000 (13:41 -0400)]
When creating a widget path, use the widget type
No need to pull the type out of the css node - its our own type.
This will let us stop setting the type on the css node later on.
Matthias Clasen [Wed, 4 May 2016 17:38:47 +0000 (13:38 -0400)]
Set the proper state on the css node
This will almost certainly overwritten before the widget gets
to the screen, but while we are doing this, we might as well
use the same state that we initialize the widgets state to.
Matthias Clasen [Wed, 4 May 2016 16:48:46 +0000 (12:48 -0400)]
css names are always set
No need to check for it, we set the css name on GtkWidgetClass
ourselves.
Timm Bäder [Wed, 4 May 2016 16:55:33 +0000 (18:55 +0200)]
switch: Remove .slider from slider gadget
As the documentation states, neither the switch nor the slider gadget
should be using any style classes.
Timm Bäder [Wed, 4 May 2016 13:25:59 +0000 (15:25 +0200)]
switch: Create less pango layouts
Instead of creating 2 pango layouts in every draw() and on in
_get_content_size (and calling into gettext twice in both cases), just
keep the layouts around and create them in only one place.
Matthias Clasen [Wed, 4 May 2016 15:19:03 +0000 (11:19 -0400)]
settings: Fix xsettings handling
I was somehow under the misconception that we'd get GdkEventSettings
events for all the xsettings at startup. That is not in general true,
so we need to make sure that we check for the xsettings value before
we use them, or derived fields. Update all the private getters to
do so; and fix settings_update_font_values() to cope with font
descriptions that might miss the family or size.
Matthias Clasen [Wed, 4 May 2016 10:28:59 +0000 (06:28 -0400)]
settings: Ensure derived fields are initialized
I mistakenly assumed that gtk_settings_init was already doing
something to trigger a notify for all properties. It doesn't,
so we have to ensure that settings_update_font_values() is
called at least once.
https://bugzilla.gnome.org/show_bug.cgi?id=765966
Matthias Clasen [Wed, 4 May 2016 03:14:05 +0000 (23:14 -0400)]
wayland: Small improvements to update_direction
Avoid memory allocation if possible, and use the proper
min/max keycodes.
Matthias Clasen [Wed, 4 May 2016 02:52:38 +0000 (22:52 -0400)]
wayland: Don't emit direction-changed unless it did
We can easily check this, so lets do it.
Matthias Clasen [Wed, 4 May 2016 02:36:20 +0000 (22:36 -0400)]
trivial formatting fixes
Matthias Clasen [Wed, 4 May 2016 02:15:17 +0000 (22:15 -0400)]
Use g_set_object in one more place
Timm Bäder [Tue, 3 May 2016 23:26:02 +0000 (19:26 -0400)]
label: don't use set_text in gtk_label_new
It would just set up lots of things with the default values, but a
common case is that a few gtk_label_set_* calls follow.
Kjartan Maraas [Tue, 3 May 2016 21:23:11 +0000 (23:23 +0200)]
Updated Norwegian bokmål translation.
Timm Bäder [Tue, 3 May 2016 20:07:50 +0000 (16:07 -0400)]
label: minimum/natural size parameters are not nullable
Stop comparing them to NULL.
Timm Bäder [Tue, 3 May 2016 20:04:58 +0000 (16:04 -0400)]
label: Don't set out parameters twice
We set them later again when we calculate the vertical size, so just
move the general assignment to -1 into the horizontal branch.
Timm Bäder [Tue, 3 May 2016 15:49:20 +0000 (17:49 +0200)]
widget: Remove useless NULL check
We are checking for allocation != NULL at the beginning of the function
already. This also means that the allocation parameter is not nullable.
Timm Bäder [Tue, 3 May 2016 14:58:02 +0000 (10:58 -0400)]
roundedbox: Initialize the hashtable key before using it
In mem_hash, we are iterating over the individual bytes of the key, so
make sure all of it is initialized.
Benjamin Otte [Tue, 3 May 2016 10:57:50 +0000 (12:57 +0200)]
cssimagebuiltin: Remove icons that don't draw anything anymore
Benjamin Otte [Mon, 2 May 2016 17:51:41 +0000 (19:51 +0200)]
cssimagebuiltin: Remove unused variables
Benjamin Otte [Mon, 2 May 2016 16:36:06 +0000 (18:36 +0200)]
widget: Remove useless comment
Olivier Fourdan [Tue, 3 May 2016 08:44:16 +0000 (10:44 +0200)]
wayland: fix up/down mix up in discrete events
The wayland specification for discrete step information for scroll and
other axes reads:
| The discrete value carries the directional information. e.g. a
| value of -2 is two steps towards the negative direction of this axis.
mutter sets a value of 1 for SCROLL_DOWN events and -1 for SCROLL_UP
events.
gdkdevice Wayland backend does the opposite, it translates a positive
discrete value as SCROLL_UP and a negative value as SCROLL_DOWN, which
ends up inverting the scrolling direction.
Fix the logic in gdkdevice Wayland to use a positive value as
SCROLL_DOWN and a negative value as SCROLL_UP so that it matches mutter
and weston logic.
https://bugzilla.gnome.org/show_bug.cgi?id=765907
Matthias Clasen [Mon, 2 May 2016 17:30:20 +0000 (13:30 -0400)]
css: Stop drawing double borders for builtins
The fallback code for rendering builtin checks, radios
and expanders was using border parameters. With the generic
gadget borders using the same parameters, this was giving
double borders.
Timm Bäder [Sat, 30 Apr 2016 19:06:07 +0000 (21:06 +0200)]
shadowsvalue: Don't draw invisible box shadows
Matthias Clasen [Mon, 2 May 2016 16:40:51 +0000 (12:40 -0400)]
defaultvalue test: Skip GdkMonitor::geometry
We never return NULL for ::geometry and ::workarea. Just skip
these properties.
Matthias Clasen [Mon, 2 May 2016 16:40:24 +0000 (12:40 -0400)]
GdkMonitor: Fix refresh-rate property
We were using g_value_set_boolean for an integer property.
Руслан Ижбулатов [Mon, 2 May 2016 14:45:44 +0000 (14:45 +0000)]
Use default VFS, not a local one (it has no network)
Matthias Clasen [Mon, 2 May 2016 11:38:26 +0000 (07:38 -0400)]
Fix gtk_paned_set_position to set position_set consistently
As pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=765676,
we were failing to set position_set if the position did not change.
Carlos Soriano [Mon, 2 May 2016 09:56:23 +0000 (11:56 +0200)]
testnotebookdnd: add one GtkListBox as tab content
To make sure we test regressions on widgets that bubble up motion
handling and can trigger the motion handling code path on GtkNotebook.
https://bugzilla.gnome.org/show_bug.cgi?id=764395
Carlos Soriano [Mon, 2 May 2016 08:19:12 +0000 (10:19 +0200)]
gtknotebook: avoid tab dnd from content
Before commit
6c1bee2377eba8 we were setting an attribute of GtkNotebook
to track the pressed button if the pressed button happened on the
tab itself.
Later in the motion handling code we were checking whether the private
pressed button attribute was set or not in order to handle a tab dnd
or not.
In commit
6c1bee2377eba8 the code changed and set the pressed button
variable unconditionally, which means, a motion event from within the
tab content triggered a tab reordering.
This happened only if the children hierarchy have a widget that bubbles
up both button press event, which sets the private pressed button
attribute; and motion events, which started the tab dnd checking the
private pressed button attribute.
A widget that experienced the regression was GtkListBox.
In order to fix it, set the button pressed variable only when it press
the tab itself, not the content.
https://bugzilla.gnome.org/show_bug.cgi?id=764395
Руслан Ижбулатов [Sun, 1 May 2016 19:00:25 +0000 (19:00 +0000)]
GtkPlacesView: check for network:// URI support before using it
Specifically, this URI is not supported on Windows, but GFile will
do its "best" and turn it into GLocalFile("$pwd/network"), with
spectacularly bad results.
https://bugzilla.gnome.org/show_bug.cgi?id=765858
Carlos Garnacho [Sun, 1 May 2016 18:05:56 +0000 (20:05 +0200)]
gdkevents: Free motion events discarded by motion compression
Those should be freed together with their list link.
Matthias Clasen [Sun, 1 May 2016 17:25:51 +0000 (13:25 -0400)]
dnd: Make sure to free a stashed event
I am not sure if this happens in practice, but better to be safe.
Matthias Clasen [Sun, 1 May 2016 17:23:12 +0000 (13:23 -0400)]
gesture: Don't leak stashed events
These events were never freed.
Matthias Clasen [Sun, 1 May 2016 17:18:55 +0000 (13:18 -0400)]
Avoid copying an event
Not a big deal, but we can be a bit more efficient when generating
grab-broken events.
Matthias Clasen [Sun, 1 May 2016 15:28:37 +0000 (11:28 -0400)]
Small docs improvement
Cross reference from gdk_event_get_keycode to
gdk_event_get_scancode.
Matthias Clasen [Sun, 1 May 2016 15:22:55 +0000 (11:22 -0400)]
Drop unused macros
These have been sitting here forever, unused. Time to drop them
Matthias Clasen [Sun, 1 May 2016 15:09:05 +0000 (11:09 -0400)]
x11: drop a useless list
We were keeping all the event sources in a list, only to remove
them at the end of their life. Not useful.
Matthias Clasen [Sun, 1 May 2016 15:06:33 +0000 (11:06 -0400)]
wayland: drop a useless list
We were keeping all the event sources in a list, only to remove
them at the end of their life. Not useful.
Matthias Clasen [Sun, 1 May 2016 17:26:09 +0000 (13:26 -0400)]
Fix the build
I forgot to add an include here.
Matthias Clasen [Sun, 1 May 2016 14:52:31 +0000 (10:52 -0400)]
wayland: Tag the event source with the acutal display name
Matthias Clasen [Sun, 1 May 2016 14:51:41 +0000 (10:51 -0400)]
wayland: Make gdk_display_get_name work
It should just return the same as gdk_screen_make_display_name.
Matthias Clasen [Sun, 1 May 2016 05:10:59 +0000 (01:10 -0400)]
css: Use setters for font size and family
This avoid creating pango font descriptions all the time, when
the gtk-font-name setting hasn't actually changed.
Matthias Clasen [Sun, 1 May 2016 05:10:33 +0000 (01:10 -0400)]
settings: Add setters for font family and size
Matthias Clasen [Sun, 1 May 2016 04:40:23 +0000 (00:40 -0400)]
treeview: Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:40:08 +0000 (00:40 -0400)]
switch: Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:39:55 +0000 (00:39 -0400)]
stack: Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:39:34 +0000 (00:39 -0400)]
scrolled window: Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:39:18 +0000 (00:39 -0400)]
Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 04:39:03 +0000 (00:39 -0400)]
popover: Use getter for gtk-enable-animations
Matthias Clasen [Sun, 1 May 2016 03:15:20 +0000 (23:15 -0400)]
Use a variable consistently
Matthias Clasen [Sun, 1 May 2016 02:39:26 +0000 (22:39 -0400)]
Use a better hash for arcs
Matthias Clasen [Sun, 1 May 2016 02:00:35 +0000 (22:00 -0400)]
css: Use a getter for the enable-animations setting
Matthias Clasen [Sun, 1 May 2016 02:00:19 +0000 (22:00 -0400)]
dnd: Use a getter for the drag threshold
Matthias Clasen [Sun, 1 May 2016 02:00:06 +0000 (22:00 -0400)]
Add a few settings getters
Matthias Clasen [Sun, 1 May 2016 01:06:38 +0000 (21:06 -0400)]
Trivial whitespace fix